package com.wuqi.dev.retrofitdemo.retrofit;

import com.wuqi.dev.retrofitdemo.entity.BrandEntity;
import com.wuqi.dev.retrofitdemo.entity.CarDetailEntity;

import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by Risky57 on 2017/4/24.
 */

// RxJava
public interface BearApi {

    @GET("models/pinpai.json")
    Observable<BrandEntity> getBrands();

    @GET("models/{index}/che_xi.json")
    Observable<BrandEntity> getCarSeries(@Path("index") int index);

    @GET("models/{indexBrand}/che_xing_{indexSeries}.json")
    Observable<BrandEntity> getCarType(@Path("indexBrand") int brand,
                                 @Path("indexSeries") int series);

    @GET("models/spec.php")
    Observable<CarDetailEntity> getCarDetail(@Query("cheXing") int type);


}
